package com.okyai.kt.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.okyai.kt.mapper.RecordPlanMapper;
import com.okyai.kt.domain.RecordPlan;
import com.okyai.kt.domain.vo.PlanExportVo;
import com.okyai.kt.service.IRecordPlanService;
import com.okyai.common.core.text.Convert;

/**
 * 档案方案Service业务层处理
 * 
 * @author okyai
 * @date 2021-03-20
 */
@Service
public class RecordPlanServiceImpl implements IRecordPlanService 
{
    @Autowired
    private RecordPlanMapper recordPlanMapper;

    /**
     * 查询档案方案
     * 
     * @param recordPlanId 档案方案ID
     * @return 档案方案
     */
    @Override
    public RecordPlan selectRecordPlanById(Long recordPlanId)
    {
        return recordPlanMapper.selectRecordPlanById(recordPlanId);
    }

    /**
     * 查询档案方案列表
     * 
     * @param recordPlan 档案方案
     * @return 档案方案
     */
    @Override
    public List<RecordPlan> selectRecordPlanList(RecordPlan recordPlan)
    {
        return recordPlanMapper.selectRecordPlanList(recordPlan);
    }

    /**
     * 新增档案方案
     * 
     * @param recordPlan 档案方案
     * @return 结果
     */
    @Override
    public int insertRecordPlan(RecordPlan recordPlan)
    {
        return recordPlanMapper.insertRecordPlan(recordPlan);
    }

    /**
     * 修改档案方案
     * 
     * @param recordPlan 档案方案
     * @return 结果
     */
    @Override
    public int updateRecordPlan(RecordPlan recordPlan)
    {
        return recordPlanMapper.updateRecordPlan(recordPlan);
    }

    /**
     * 删除档案方案对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteRecordPlanByIds(String ids)
    {
        return recordPlanMapper.deleteRecordPlanByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除档案方案信息
     * 
     * @param recordPlanId 档案方案ID
     * @return 结果
     */
    @Override
    public int deleteRecordPlanById(Long recordPlanId)
    {
        return recordPlanMapper.deleteRecordPlanById(recordPlanId);
    }

	@Override
	public List<PlanExportVo> export(Long recordPlanId) {
		return recordPlanMapper.export(recordPlanId);
	}
    
    
}
